<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								是否异议：<select name="isObjection" th:with="type=${@dict.getType('pay_yes_no')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								提出异议人：<input type="text" name="objectionId"/>
							</li>

							<li>
								提出异议者：<input type="text" name="objectionName"/>
							</li>

							<li>
								异议状态：<select name="objectionState" th:with="type=${@dict.getType('pay_order_objection_state')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								异议类型：<select name="objectionType" th:with="type=${@dict.getType('pay_order_objection_type')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								异议结果：<select name="objectionRes" th:with="type=${@dict.getType('pay_order_objection_res')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								是否仲裁：<select name="isArbitrate" th:with="type=${@dict.getType('pay_yes_no')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								提出仲裁者：<input type="text" name="arbitrateId"/>
							</li>

							<li>
								提出仲裁名字：<input type="text" name="arbitrateName"/>
							</li>

							<li>
								仲裁状态：<select name="arbitrateState" th:with="type=${@dict.getType('pay_order_arbitrate_state')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								仲裁类型：<select name="arbitrateType" th:with="type=${@dict.getType('pay_order_arbitrate_type')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								仲裁结果：<select name="arbitrateRes" th:with="type=${@dict.getType('pay_order_arbitrate_res')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								审批状态：<select name="adminState" th:with="type=${@dict.getType('pay_order_admin_state')}">
									<option value="">所有</option>
									<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
								</select>
							</li>
							<li>
								处理人员：<input type="text" name="adminId"/>
							</li>

							<li>
								处理人员名字：<input type="text" name="adminName"/>
							</li>

							<li>
								处理结果：<input type="text" name="adminRes"/>
							</li>

							<li>
								处理备注：<input type="text" name="adminComment"/>
							</li>

							<li>
								异议时间：<input type="text" name="objectionCreateTime"/>
							</li>

							<li>
								异议结束时间：<input type="text" name="objectionEndTime"/>
							</li>

							<li>
								仲裁时间：<input type="text" name="arbitrateCreateTime"/>
							</li>

							<li>
								仲裁结束时间：<input type="text" name="arbitrateEndTime"/>
							</li>

							<li class="select-time">
								<label>审批时间： </label>
								<input type="text" class="time-input" id="startAdminTime" placeholder="开始" name="params[beginAdminTime]"/>
								<span>-</span>
								<input type="text" class="time-input" id="endAdminTime" placeholder="结束" name="params[endAdminTime]"/>
							</li>
							<li class="select-time">
								<label>更新时间： </label>
								<input type="text" class="time-input" id="startUpdateTime" placeholder="开始" name="params[beginUpdateTime]"/>
								<span>-</span>
								<input type="text" class="time-input" id="endUpdateTime" placeholder="结束" name="params[endUpdateTime]"/>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm hidden-xs" id="toolbar" role="group">
				<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="pay:order:state:add">
					<i class="fa fa-plus"></i> 添加
				</a>
				<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="pay:order:state:edit">
					<i class="fa fa-edit"></i> 修改
				</a>
				<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="pay:order:state:remove">
					<i class="fa fa-remove"></i> 删除
				</a>
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="pay:order:state:export">
						<i class="fa fa-download"></i> 导出
				 </a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('pay:order:state:edit')}]];
        var removeFlag = [[${@permission.hasPermi('pay:order:state:remove')}]];
        var prefix = ctx + "pay/order/state";
        var orderIsObjectionDir = [[${@dict.getType('pay_yes_no')}]];
        var orderObjectionStateDir = [[${@dict.getType('pay_order_objection_state')}]];
        var orderObjectionTypeDir = [[${@dict.getType('pay_order_objection_type')}]];
        var orderObjectionResDir = [[${@dict.getType('pay_order_objection_res')}]];
        var orderIsArbitrateDir = [[${@dict.getType('pay_yes_no')}]];
        var orderArbitrateStateDir = [[${@dict.getType('pay_order_arbitrate_state')}]];
        var orderArbitrateTypeDir = [[${@dict.getType('pay_order_arbitrate_type')}]];
        var orderArbitrateResDir = [[${@dict.getType('pay_order_arbitrate_res')}]];
        var orderAdminStateDir = [[${@dict.getType('pay_order_admin_state')}]];

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "订单审批",
				search: false,
		        showExport: true,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'orderStateId', 
					title : '',
					visible: false
				},
				{
					field : 'isObjection', 
					title : '是否异议',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderIsObjectionDir, value);
		            }
				},
				{
					field : 'objectionId', 
					title : '提出异议人',
					sortable: true
				},
				{
					field : 'objectionName', 
					title : '提出异议者',
					sortable: true
				},
				{
					field : 'objectionState', 
					title : '异议状态',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderObjectionStateDir, value);
		            }
				},
				{
					field : 'objectionType', 
					title : '异议类型',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderObjectionTypeDir, value);
		            }
				},
				{
					field : 'objectionRes', 
					title : '异议结果',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderObjectionResDir, value);
		            }
				},
				{
					field : 'isArbitrate', 
					title : '是否仲裁',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderIsArbitrateDir, value);
		            }
				},
				{
					field : 'arbitrateId', 
					title : '提出仲裁者',
					sortable: true
				},
				{
					field : 'arbitrateName', 
					title : '提出仲裁名字',
					sortable: true
				},
				{
					field : 'arbitrateState', 
					title : '仲裁状态',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderArbitrateStateDir, value);
		            }
				},
				{
					field : 'arbitrateType', 
					title : '仲裁类型',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderArbitrateTypeDir, value);
		            }
				},
				{
					field : 'arbitrateRes', 
					title : '仲裁结果',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderArbitrateResDir, value);
		            }
				},
				{
					field : 'adminState', 
					title : '审批状态',
					sortable: true,
					formatter: function(value, row, index) {
		            	return $.table.selectDictLabel(orderAdminStateDir, value);
		            }
				},
				{
					field : 'adminId', 
					title : '处理人员',
					sortable: true
				},
				{
					field : 'adminName', 
					title : '处理人员名字',
					sortable: true
				},
				{
					field : 'adminRes', 
					title : '处理结果',
					sortable: true
				},
				{
					field : 'adminComment', 
					title : '处理备注',
					sortable: true
				},
				{
					field : 'objectionCreateTime', 
					title : '异议时间',
					sortable: true
				},
				{
					field : 'objectionEndTime', 
					title : '异议结束时间',
					sortable: true
				},
				{
					field : 'arbitrateCreateTime', 
					title : '仲裁时间',
					sortable: true
				},
				{
					field : 'arbitrateEndTime', 
					title : '仲裁结束时间',
					sortable: true
				},
				{
					field : 'adminTime', 
					title : '审批时间',
					sortable: true
				},
				{
					field : 'updateTime', 
					title : '更新时间',
					sortable: true
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.orderStateId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.orderStateId + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>